package com.quectel.business.dms.application.access.accessor.ipg.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
@Builder
public class AuthCarCmd {


    /**
     * 操作类型 1新增 2删除
     */
    private Byte type;

    private List<AuthCarCmd.DeviceInfo> deviceInfoList;

    @Data
    public static class DeviceInfo {

        /**
         * 设备所属应用id
         */
        private Long applicationId;

        /**
         * 设备唯一编码
         */
        private String deviceUniqueId;
    }

    private String license;
    private Byte licenseColor;
    private Date deadline;
    private Map<String, Object> payload;

    @AllArgsConstructor
    public enum TypeEnum {
        ADD((byte) 1),
        DEL((byte) 2);

        @Getter
        private Byte type;
    }

}
